/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-11-23 15:11:33
 * @LastEditTime: 2022-12-28 16:07:19
 */
import { Space } from 'antd';
import { useMemo } from 'react';
import { useFamilyStatisticsContext } from '../contexts/FamilyStatisticsContext';
import AccessRights from './AccessRights';
import ClassificationDocuments from './ClassificationDocuments';
import Company from './Company';
import ConfidentialityLevel from './ConfidentialityLevel';
import FileType from './FileType';
import RetentionPeriod from './RetentionPeriod';
import StorageFormat from './StorageFormat';
import Time from './Time';

const BodyWarp = () => {
  const { ATList, storageFormatList, retentionPeriodList } = useFamilyStatisticsContext();

  return (
    <>
      <Space direction="vertical" size="middle" style={{ display: 'flex' }}>
        {useMemo(() => ATList && <FileType ATList={ATList} />, [ATList])}
        {useMemo(() => ATList && <ClassificationDocuments ATList={ATList} />, [ATList])}
        {useMemo(() => ATList && storageFormatList && <StorageFormat ATList={ATList} />, [ATList])}
        {useMemo(
          () => ATList && retentionPeriodList && <RetentionPeriod ATList={ATList} />,
          [ATList]
        )}
        {useMemo(() => ATList && <AccessRights ATList={ATList} />, [ATList])}
        {useMemo(() => ATList && <ConfidentialityLevel ATList={ATList} />, [ATList])}
        {useMemo(() => ATList && <Company ATList={ATList} />, [ATList])}
        {useMemo(() => ATList && retentionPeriodList && <Time ATList={ATList} />, [ATList])}

        {/* <FileType />
        <ClassificationDocuments />
        <StorageFormat />
        <RetentionPeriod />
        <AccessRights />
        <ConfidentialityLevel />
        <Company /> */}
        {/* <Time /> */}
      </Space>
    </>
  );
};
export default BodyWarp;
